package com.xuecheng.learning.service;

import com.xuecheng.commons.model.dto.LearningProgressDto;
import com.xuecheng.commons.model.dto.RecordDto;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.learning.domain.CourseRecord;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 选课记录 服务类
 * </p>
 *
 * @author HuangYuwu
 * @since 2022-09-16
 */
public interface CourseRecordService extends IService<CourseRecord> {

    /**
     * 获取当前课程发布的学习进度
     * @param coursePubId
     * @return
     */
    ResponseResult myCourseRecord(Long coursePubId);

    /**
     * （支付成功）保存或更新选课记录
     * @param recordDto
     * @return
     */
    ResponseResult saveRecord(RecordDto recordDto);

    /**
     * 课程详情页查询媒资播放地址
     * @param coursePubId
     * @param mediaId
     * @param teachplanId
     * @return
     */
    ResponseResult resourceUrl(Long coursePubId, Long mediaId, Long teachplanId);

    /**
     * 免费课程新增选课，或者更新学习进度
     * @param learningProgressDto
     * @return
     */
    ResponseResult progress(LearningProgressDto learningProgressDto);
}
